#{extends 'main.html' /}
#{set title:'CoolSoft - Edit Roles' /}
*{this is the page for the changing of role}*

	Title: <input type="text" name="title" id="title" value="${title}" />
	<br>
	<br>
	Choose Role to inherit from:
	<br>	
	#{form @RoleCRUD.inheritEditRole(title,roleId,inheritRole)}
	<select name="inheritRole">
	#{list items:rList, as:'inheritRole'}
		<option value="${inheritRole.id}">${inheritRole.title}</option>	
	#{/list}
	</select>
	<input type="submit" value="inherit!" />
	#{/form}
	<br>	
	#{form @RoleCRUD.edited(title,roleId,action)}
	<select name="action" multiple="yes">
	#{list items:aList, as:'action'}
	#{list items:aSelList, as:'actionSel'}
	#{if action.id==actionSel.id}
	<option value="${action.id}" selected="true">${action.name}</option>
	%{flag = "true";}%
	#{/if}
	#{/list}
	#{if flag != "true"}
	<option value="${action.id}">${action.name}</option>
	#{/if}
	%{flag = "false";}%
	#{/list}
	</select>
	<input type="submit" value="edit!" />
	#{/form}